package com.soft.line.filter;


import com.google.gson.Gson;

public class GsonUtil {
    public static String javabeanToJson(final UserTokenDto user) {
        final Gson gson = new Gson();
        final String json = gson.toJson(user);
        return json;
    }

    public static UserTokenDto jsonToJavaBean(final String json) {
        final Gson gson = new Gson();
        final UserTokenDto user = gson.fromJson(json, UserTokenDto.class);
        return user;
    }

}
